Skip to content

Conversation

@mfaferek93
Copy link
Collaborator

@mfaferek93 mfaferek93 commented Nov 23, 2025

Pull Request

Description

What changed and why.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Related issues

Fixes # (if applicable)
Related to # (if applicable)

How has this been tested?

Describe the tests you ran to verify your changes.

Checklist

  • My code follows the project's coding style
  • I ran colcon build and the build succeeds without warnings
  • I ran colcon test and all tests pass locally
  • I added/updated tests where applicable
  • I updated documentation where applicable
  • My commit messages are clear and descriptive

Additional notes for reviewers

@mfaferek93 mfaferek93 self-assigned this Nov 23, 2025
@mfaferek93
Copy link
Collaborator Author

@copilot please review last commit

Copy link
Contributor

Copilot AI commented Nov 23, 2025

@mfaferek93 I've opened a new pull request, #21, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements two new REST API endpoints for component discovery and filtering: /components (lists all components across all areas) and /areas/{area_id}/components (lists components within a specific area). These endpoints enhance the gateway's discovery capabilities by exposing component-level information in addition to the existing area-level data.

Key Changes:

  • Added two new REST endpoint handlers (handle_list_components and handle_area_components) following existing patterns
  • Implemented comprehensive integration tests with proper error case coverage (404 for non-existent areas)
  • Updated documentation with detailed API reference including examples, response structures, and use cases

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/ros2_medkit_gateway/src/rest_server.cpp Implements two new endpoint handlers with consistent error handling and JSON serialization
src/ros2_medkit_gateway/include/ros2_medkit_gateway/rest_server.hpp Adds function declarations for the two new endpoint handlers
src/ros2_medkit_gateway/test/test_integration.test.py Adds three comprehensive tests covering component listing, area-filtered components, and 404 error handling; renumbers existing test from test_21_ to test_04_ for sequential ordering
src/ros2_medkit_gateway/README.md Adds extensive API documentation with curl examples, response formats, field descriptions, and use cases for both new endpoints
postman/collections/ros2-medkit-gateway.postman_collection.json Adds two new Postman requests for testing the component endpoints
postman/README.md Updates quick start guide with examples for testing the new endpoints
docs/README.md Updates architecture documentation to reflect the new endpoints

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Add endpoint to list components within a specific area with error handling.

Changes:
- Add REST handler for GET /areas/{area_id}/components with path parameter
- Implement area validation and 404 error response for nonexistent areas
- Filter components by area from entity cache
- Add test_05_area_components_success integration test
- Add test_06_area_components_nonexistent_error integration test
- Update README with API reference, success/error examples, and use cases
- Update Postman collection with new endpoint and testing instructions
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI commented Nov 23, 2025

@mfaferek93 I've opened a new pull request, #22, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@bburda bburda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bburda bburda merged commit 754bea6 into main Nov 23, 2025
19 checks passed
@mfaferek93 mfaferek93 deleted the 16/feat/GET/areas/area_id/components branch November 26, 2025 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement GET /areas/{area_id}/components endpoint to list components within a specific area

3 participants